package com.example.score.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExamBaseDTO {
    @JsonProperty("isrepublish")
    private Boolean isrepublish;
    // 考试基础信息
    @JsonProperty("exam_id")
    private Long examId;
    @JsonProperty("exam_name")
    private String examName;
    @JsonProperty("start_time")
    private String startTime;
    @JsonProperty("end_time")
    private String endTime;
    @JsonProperty("exam_type")
    private Integer examType;
    @JsonProperty("school_id")
    private Long schoolId;
    @JsonProperty("school_oms_id")
    private Long schoolOmsId;
    @JsonProperty("school_name")
    private String schoolName;
    @JsonProperty("school_number")
    private String schoolNumber;
    @JsonProperty("stage_id")
    private Long stageId;
    @JsonProperty("stage_oms_id")
    private Long stageOmsId;
    private String stage;

    // 考试详情信息
    @JsonProperty("subject_id")
    private Long subjectId;
    @JsonProperty("subject_onlyid")
    private Long subjectOnlyid;
    @JsonProperty("subject_name")
    private String subjectName;
    @JsonProperty("full_score")
    private Integer fullScore;
    private Integer status;

    // 年级、班级、题目信息
    @JsonProperty("chidren_grade")
    private List<GradeDTO> chidrenGrade;
    @JsonProperty("ques_infos")
    private List<QuestionDTO> quesInfos;

    @Data
    public static class GradeDTO {
        @JsonProperty("grade_id")
        private Long gradeId;
        @JsonProperty("grade_oms_id")
        private Long gradeOmsId;
        @JsonProperty("grade_name")
        private String gradeName;
        @JsonProperty("chidren_class")
        private List<ClassDTO> chidrenClass;
    }

    @Data
    public static class ClassDTO {
        @JsonProperty("class_id")
        private Long classId;
        @JsonProperty("class_oms_id")
        private Long classOmsId;
        @JsonProperty("class_name")
        private String className;
        @JsonProperty("student_count")
        private Integer studentCount;
        @JsonProperty("student_submit_count")
        private Integer studentSubmitCount;
        @JsonProperty("class_firstpushscore_time")
        private String classFirstpushscoreTime;
    }

    @Data
    public static class QuestionDTO {
        @JsonProperty("question_id")
        private Long questionId;
        @JsonProperty("question_bank_id")
        private String questionBankId;
        @JsonProperty("question_num")
        private Integer questionNum;
        @JsonProperty("question_alias")
        private String questionAlias;
        @JsonProperty("question_type")
        private Long questionType;
        @JsonProperty("question_type_name")
        private String questionTypeName;
        @JsonProperty("question_answer")
        private String questionAnswer;
        @JsonProperty("question_score")
        private Double questionScore;
        @JsonProperty("is_subjective_item")
        private Integer isSubjectiveItem;
        private List<QuestionDTO> chidren;
        private String x;
        private String y;
        private String w;
        private String h;
        private Integer page;

    }
} 